import request from '@/utils/request'
import { downloadAction } from '@/api/requestEvents'

//获得项目变更申请分页
export function changeAppleyPage(params: any) {
  return request({
    url: '/project/change-apply/page',
    method: 'get',
    params,
  })
}

//创建项目变更申请
export function changeAppleyCreate(data: any) {
  return request({
    url: '/project/change-apply/create',
    method: 'post',
    data,
  })
}

//更新项目变更申请
export function changeAppleyUpdate(data: any) {
  return request({
    url: '/project/change-apply/update',
    method: 'put',
    data,
  })
}

//获得项目变更申请详情
export function changeAppleyGet(params: any) {
  return request({
    url: '/project/change-apply/get',
    method: 'get',
    params,
  })
}

//导出项目变更申请 Excel
export function changeAppleyGetExport(params: any) {
  downloadAction(
    '/project/change-apply/export-excel',
    'get',
    params,
    '项目变更申请列表.xls'
  )
}
